<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加用例</title>
    <style>
        /* 整体样式 */
        body {
            font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }

        /* 页头样式 */
        header {
            background-color: #1890ff;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        /* 主内容区域样式 */
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 40px 0;
        }

        /* 模块样式 */
        .module {
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 80%;
            margin-bottom: 20px;
        }

        .module h2 {
            margin-top: 0;
        }

        .module label {
            display: block;
            margin-bottom: 10px;
        }

        .module input,
        .module select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-sizing: border-box;
        }

        .module button {
            background-color: #1890ff;
            border: none;
            border-radius: 5px;
            color: #fff;
            cursor: pointer;
            padding: 10px 20px;
            width: 100%;
        }

        .module button:hover {
            background-color: #40a9ff;
        }

        .success-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #52c41a;
            color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            display: none;
        }
    </style>
</head>
<body>
<header>
    <h1>添加用例</h1>
</header>

<div class="container">
    <div class="module">
        <h2>用例详情</h2>
        <label for="test-case-name">用例名称:</label>
        <input type="text" id="test-case-name" name="test-case-name" required>

        <label for="group">所属分组:</label>
        <input type="text" id="group" name="group" required>

        <label for="url">URL:</label>
        <input type="text" id="url" name="url" required>

        <label for="request-method">请求方法:</label>
        <select id="request-method" name="request-method" required>
            <option value="get">GET</option>
            <option value="post">POST</option>
            <option value="put">PUT</option>
            <option value="delete">DELETE</option>
        </select>

        <button type="submit" onclick="showSuccessMessage()">提交</button>
    </div>
</div>

<div class="success-message" id="success-message">
    <h2>提交成功!</h2>
</div>

<script>
    function showSuccessMessage() {
        var successMessage = document.getElementById("success-message");
        successMessage.style.display = "block";

        // 2 秒后自动隐藏提示
        setTimeout(function() {
            successMessage.style.display = "none";
        }, 2000);
    }
</script>
</body>
</html>